package cn.usain.service.impl;

import cn.usain.entity.Leader;
import cn.usain.mapper.LeadersMapper;
import cn.usain.service.LeaderService;
import com.jiyun.Result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class LeaderServiceImpl implements LeaderService {

    @Autowired
    private LeadersMapper groupLeaderMapper;


    @Override
    public Result addGroupLeader(Leader leader) {
        int rowsAffected = groupLeaderMapper.insertGroupLeader(leader);
        if (rowsAffected > 0) {
            return Result.ok("添加成功");
        } else {
            return Result.fail("添加失败");
        }
    }

}
